home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / btoa52.zip / BTOA.H < prev    next >
C/C++ Source or Header  |  1994-04-08  |  2KB  |  72 lines

  1. /* btoa.h */
  2.  
  3. #define MAXPERLINE      78
  4. #define BUFSIZE         100
  5. #define TRUE            1
  6. #define FALSE           0
  7. #define USE_MACROS      TRUE
  8.  
  9. #define BYTE            char
  10. #define WORD            short
  11. #define LONG            long
  12.  
  13. #define ENCODE(ch)      ( (int) ((ch) + '!') )
  14. #define DECODE(ch)      ( (int) ((ch) - '!') )
  15.  
  16. struct Diagnosis
  17. {
  18.   LONG startpos, endpos;  /* Line before and after erroneous area */
  19.   struct Diagnosis *next, *last;
  20. };
  21.  
  22.  
  23. /*
  24. Following functions have been converted to macros:
  25.   calcchecksum()
  26. */
  27.  
  28.  
  29. #if LATTICE  /* Prototypes for Lattice C */
  30.  
  31. void asciiout(int), exit(int),
  32.      intodiagnosislist(struct Diagnosis *, LONG, LONG),
  33.      outdiagnosislist(struct Diagnosis *, LONG *, LONG *), printhelp(void),
  34.      producediagnosis(struct Diagnosis *, FILE *), wordout(LONG);
  35.  
  36. BYTE atob(FILE *), btoa(FILE *, BYTE *), copyfile(FILE *, FILE *, BYTE *),
  37.      decode_line(BYTE *, int), new_decodefile(FILE *, LONG *, LONG, int),
  38.      old_decodefile(FILE *, LONG *), performrepair(FILE *),
  39.      producerepair(FILE *), readbuffer(BYTE *, BYTE *, FILE *),
  40.      *truncname(BYTE *);
  41.  
  42. int  nextbyte(FILE *);
  43.  
  44. FILE *fopen_read(BYTE *), *fopen_write(BYTE *);
  45.  
  46. #if USE_MACROS
  47. void calcchecksum(int);
  48. #else
  49. #include "chksum.h"
  50. #endif USE_MACROS
  51.  
  52. #else !LATTICE  /* For compilers which don't know about prototypes. */
  53.  
  54. void asciiout(), exit(), intodiagnosislist(), outdiagnosislist(),
  55.      printhelp(), producediagnosis(), wordout();
  56.  
  57. BYTE atob(), btoa(), copyfile(), decode_line(), new_decodefile(),
  58.      old_decodefile(), performrepair(), producerepair(), readbuffer(),
  59.      *truncname();
  60.  
  61. int  nextbyte();
  62.  
  63. FILE *fopen_read(), *fopen_write();
  64.  
  65. #if USE_MACROS
  66. void calcchecksum();
  67. #else
  68. #include "chksum.h"
  69. #endif USE_MACROS
  70.  
  71. #endif LATTICE
  72.